package com.landtool.lanbase.entity;

import com.landtool.lanbase.utils.FileUtils;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;


import static org.springframework.beans.factory.config.ConfigurableBeanFactory.*;

/**
 * 动态添加es 索引
 */

@Component("rollover")
@Scope(value = SCOPE_PROTOTYPE)
public class RolloverStrategy {

    private String monthlyDateFormat;

    @PostConstruct
    void after(){
        monthlyDateFormat = FileUtils.getRadarName();
    }


    public String getMonthlyDateFormat() {
        return monthlyDateFormat;
    }

    public void setMonthlyDateFormat(String monthlyDateFormat) {
        this.monthlyDateFormat = monthlyDateFormat;
    }

}
